home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 25 / CU Amiga Magazine's Super CD-ROM 25 (1998)(EMAP Images)(GB)(Track 1 of 2)[!][issue 1998-08].iso / CUCD / Programming / GMS / GMSDev / Includes / desktop / desktop.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-05-10  |  4.0 KB  |  140 lines

  1. #ifndef DESKTOP_DESKTOP_H
  2. #define DESKTOP_DESKTOP_H TRUE
  3.  
  4. /*
  5. **  $VER: desktop.h V1.0
  6. **
  7. **  Desktop Definitions.
  8. **
  9. **  (C) Copyright 1996-1998 DreamWorld Productions.
  10. **      All Rights Reserved.
  11. */
  12.  
  13. #ifndef DPKERNEL_H
  14. #include <dpkernel/dpkernel.h>
  15. #endif
  16.  
  17. /***************************************************************************
  18. ** Desktop object.
  19. */
  20.  
  21. #define TAGS_DESKTOP ((ID_SPCTAGS<<16)|ID_DESKTOP)
  22. #define VER_DESKTOP  1
  23.  
  24. typedef struct Desktop {
  25.   struct Head    Head;       /* 00 [--] Standard header structure */
  26.   struct MenuBar *MenuBar;   /* 12 [--] Only 1 menu bar is allowed */
  27.   struct Bob     *Pointer;   /* 16 [--] The pointer for this desktop */
  28.   struct GScreen *Screen;    /* 20 [--] The Screen that is owned by the Desktop */
  29.   struct Chain   *Icons;     /* 24 [--] First icon on the chain */
  30.   struct Chain   *Windows;   /* 28 [--] First window on the chain */
  31.   struct Chain   *Children;  /* 32 [--] All the other children inside the desktop */
  32.   LONG   Gadgets;            /* 36 [--] Gadget flags */
  33.   struct Bob     *Wallpaper; /* 40 [--] Bob to use as wall paper */
  34.   LONG   Flags;
  35.  
  36.   /*** Private fields ***/
  37.  
  38.   struct Bob *prvPointer;
  39.   struct Bob *prvWallpaper;
  40. } DESKTOP;
  41.  
  42. #define DSA_MenuBar   (TAPTR|12)
  43. #define DSA_Pointer   (TAPTR|16)
  44. #define DSA_Gadgets   (TLONG|36)
  45. #define DSA_Wallpaper (TAPTR|40)
  46.  
  47. #define DSA_MenuBarTags   (TSTEPIN|TTRIGGER|12)
  48. #define DSA_PointerTags   (TSTEPIN|TTRIGGER|16)
  49. #define DSA_GadgetsTags   (TSTEPIN|TTRIGGER|36)
  50. #define DSA_WallpaperTags (TSTEPIN|TTRIGGER|40)
  51.  
  52. /**************************************************************************/
  53.  
  54. #define GDF_CLOSE 0x00000001
  55. #define GDF_FLIP  0x00000002
  56.  
  57. #define DSF_Tile 0x00000001
  58.  
  59. /***************************************************************************
  60. ** This is the Chain object.  The advantage of an object chain is that
  61. ** it allows you to link up lots of objects that you don't know anything
  62. ** about chaining.
  63. */
  64.  
  65. #define VER_CHAIN  1
  66. #define TAGS_CHAIN ((ID_SPCTAGS<<16)|ID_CHAIN)
  67.  
  68. typedef struct Chain {
  69.   struct Head *Stats;      /* 00 Standard header */
  70.   struct Chain *Next;      /* 12 Next chain object */
  71.   struct Chain *Prev;      /* 16 Previous chain object */
  72.   APTR Object;             /* 20 Pointer to the object belonging to this node */
  73. } CHAIN;
  74.  
  75. #define CNA_Next   (TAPTR|12)
  76. #define CNA_Prev   (TAPTR|16)
  77. #define CNA_Object (TAPTR|20)
  78.  
  79. /***************************************************************************
  80. ** These are Window gadgets, the Window class holds pointers to them
  81. ** privately.  Since they are standard DPK objects, you can enhance them,
  82. ** add animations to gadgets etc...
  83. */
  84.  
  85. struct GadClose {
  86.   struct Head Head;    /* Standard header structure */
  87.   struct Bob  *Image;  /* Gadget Image (Bob) */
  88. };
  89.  
  90. struct GadIconify {
  91.   struct Head *Stats;  /* Standard header structure */
  92.   struct Bob *Image;   /* Gadget Image (Bob) */
  93. };
  94.  
  95.  
  96. struct GadMaximise {
  97.   struct Head *Stats;  /* Standard header structure */
  98.   struct Bob *Image;   /* Gadget Image (Bob) */
  99. };
  100.  
  101. struct GadResize {
  102.   struct Head *Stats;  /* Standard header structure */
  103.   struct Bob *Image;   /* Gadget Image (Bob) */
  104. };
  105.  
  106. /***************************************************************************
  107. ** Font.
  108. */
  109.  
  110. #define TAGS_FONT ((ID_SPCTAGS<<16)|ID_FONT)
  111. #define VER_FONT  1
  112.  
  113. typedef struct Font {
  114.   struct Head Head;   /* Standard header structure */
  115.   BYTE   *FontName;   /* Name from the fonts directory */
  116.   LONG   Flags;       /* */
  117.   WORD   Size;        /* What point font */
  118.   LONG   RGBColour;   /* Colour of the font */
  119. } FONT;
  120.  
  121. #define FNT_BOLD    0x00000001
  122. #define FNT_ITALICS 0x00000002
  123. #define FNT_SMOOTH  0x00000004
  124.  
  125. /***************************************************************************
  126. ** Icon.
  127. */
  128.  
  129. #define TAGS_ICON ((ID_SPCTAGS<<16)|ID_ICON)
  130. #define VER_ICON  1
  131.  
  132. typedef struct Icon {
  133.   struct Head Head;   /* Standard header structure */
  134.   struct Bob  *Image; /* The drawable part of the icon */
  135.   struct Font *Font;  /* What font should we use to print the name [O] */
  136.   BYTE   *Name;       /* The name to appear under the image */
  137. } ICON;
  138.  
  139. #endif /* DESKTOP_DESKTOP_H */
  140.